/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

import com.springjsf.services.CityService;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
import org.springframework.beans.factory.annotation.Autowired;

/**
 *
 * @author beheraab
 */
@ManagedBean
@RequestScoped
public class DistanceBean {

    private String srcCity;
    private String destCity;
    private double distance;
    
    @Autowired CityService cityService;
    
    public String getDestCity() {
        return destCity;
    }

    public void setDestCity(String destCity) {
        this.destCity = destCity;
    }

    public double getDistance() {
        return distance;
    }

    public void setDistance(double distance) {
        this.distance = distance;
    }

    public String getSrcCity() {
        return srcCity;
    }

    public void setSrcCity(String srcCity) {
        this.srcCity = srcCity;
    }
    
    /** Creates a new instance of DistanceBean */
    public DistanceBean() {
    }
    
    public void find() {
        System.out.println("cityService " + cityService);
        //distance = cityService.findDistance(srcCity, destCity);
    }
}
